//
//  TestProblem1005.swift
//  LeetCodeTests
//
//  Created by 毕武侠 on 2023/6/23.
//  Copyright © 2023 zhulongiMac02. All rights reserved.
//

import XCTest
@testable import LeetCode

final class TestProblem1005: XCTestCase {

    var problem = Problem1005()
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // MARK: - 排序
    func testProblem1005_Case1() throws {
        XCTAssertEqual(problem.largestSumAfterKNegations([4,2,3], 1), 5)
    }
    
    func testProblem1005_Case2() throws {
        XCTAssertEqual(problem.largestSumAfterKNegations([3,-1,0,2], 3), 6)
    }
    
    func testProblem1005_Case3() throws {
        XCTAssertEqual(problem.largestSumAfterKNegations([2,-3,-1,5,-4], 2), 13)
    }
    
    func testProblem1005_Case4() throws {
        XCTAssertEqual(problem.largestSumAfterKNegations([-4,-2,-3], 4), 5)
    }
    
    
}
